how to sort an array of numbers in js